home *** CD-ROM | disk | FTP | other *** search
/ Visual Basic Source Code / Visual Basic Source Code.iso / vbsource / nivb / afp.frm < prev    next >
Text File  |  1995-05-07  |  3KB  |  103 lines

  1. VERSION 2.00
  2. Begin Form AFPForm 
  3.    Caption         =   "Test NetWare AFP Services"
  4.    ClientHeight    =   3105
  5.    ClientLeft      =   2490
  6.    ClientTop       =   1590
  7.    ClientWidth     =   6645
  8.    Height          =   3510
  9.    Left            =   2430
  10.    LinkMode        =   1  'Source
  11.    LinkTopic       =   "Form5"
  12.    ScaleHeight     =   3105
  13.    ScaleWidth      =   6645
  14.    Top             =   1245
  15.    Width           =   6765
  16.    Begin CommandButton SearchButton 
  17.       Caption         =   "&Search"
  18.       Height          =   375
  19.       Left            =   2160
  20.       TabIndex        =   2
  21.       Top             =   2640
  22.       Width           =   855
  23.    End
  24.    Begin ListBox ServerList 
  25.       FontBold        =   -1  'True
  26.       FontItalic      =   0   'False
  27.       FontName        =   "Courier"
  28.       FontSize        =   9.75
  29.       FontStrikethru  =   0   'False
  30.       FontUnderline   =   0   'False
  31.       Height          =   1590
  32.       Left            =   120
  33.       TabIndex        =   1
  34.       Top             =   480
  35.       Width           =   6375
  36.    End
  37.    Begin CommandButton CancelButton 
  38.       Caption         =   "&Cancel"
  39.       Height          =   330
  40.       Left            =   3720
  41.       TabIndex        =   0
  42.       Top             =   2640
  43.       Width           =   870
  44.    End
  45.    Begin Label Label2 
  46.       Caption         =   "Attached file servers:"
  47.       Height          =   255
  48.       Left            =   120
  49.       TabIndex        =   4
  50.       Top             =   120
  51.       Width           =   2055
  52.    End
  53.    Begin Label Label1 
  54.       Caption         =   "Click Search to view AFP information for a selected file."
  55.       Height          =   255
  56.       Left            =   840
  57.       TabIndex        =   3
  58.       Top             =   2280
  59.       Width           =   4815
  60.    End
  61. End
  62.  
  63. Sub CancelButton_Click ()
  64.     Unload AFPForm
  65. End Sub
  66.  
  67. Sub Form_Load ()
  68.     For connID% = 1 To 8
  69.         'for each connection in workstation's file server name table
  70.         'get the table entry, then see if it's null
  71.         
  72.         serverName$ = String$(48, 0)
  73.  
  74.         If (IsConnectionIDInUse(connID%) = 1) Then
  75.             GetFileServerName connID%, serverName$
  76.             serverName$ = Left$(serverName$, InStr(serverName$, Chr$(0)) - 1)
  77.             If (Len(serverName$) > 20) Then
  78.                 serverName$ = Left$(serverName$, 20)
  79.             End If
  80.  
  81.             If (AFPSupported(connID%) = 1) Then
  82.                 ServerList.AddItem Str$(connID%) + "  " + serverName$ + String$(22 - Len(serverName$), " ") + " AFP Supported"
  83.             Else
  84.                 ServerList.AddItem Str$(connID%) + "  " + serverName$ + String$(22 - Len(serverName$), " ") + " AFP Not Supported"
  85.             End If
  86.         End If
  87.     Next connID%
  88.  
  89.     ServerList.ListIndex = 0
  90.     AFPForm.Show
  91.     SearchButton.SetFocus
  92. End Sub
  93.  
  94. Sub SearchButton_Click ()
  95.     currentForm = AFP_FORM
  96.     SelectFileForm.Show
  97. End Sub
  98.  
  99. Sub ServerList_DblClick ()
  100.     SearchButton_Click
  101. End Sub
  102.  
  103.